#ifndef _GLOBAL_H_
#define _GLOBAL_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

#include "term_caps.h"
#include "fifo.h"

#define pr_fatal()

#define tb_malloc malloc
#define tb_realloc realloc
#define tb_free free

#define TB_OK 0
#define TB_ERR 1



typedef struct {
    int tty_fd;
    void *term;
    const char *caps[TB_CAP__COUNT];

    fifo_t in;
    fifo_t out;

    int width;
    int height;
} tb_global_t;

extern tb_global_t global;

#endif
